added flexible pathing