check if shortest path will cross min or max, issue #147
add a few more tests, issue #147
fix description