added slight randomization in pathfinding