US stocks close with strong gains as tech leads way