changes to path calculation sequence
additional constraints to permutation generation
more tests