new shorpath algorithm
more precise