changed from getState to getWaypointIndex