changed get2dVertices to return 2d array of vertices