gets all the points and stores them in an array