make path_drop include the starting point
refactor adjacency detection