added support for desired direction in waypoints