added waypoint support