Storing and using the waypoints to determine where to go next