using a single dimension array instead of double for verticies.