improved path finding