pathfinder removes unnecessary positions in list