initializes u, v, and the vectors