Revert "revert change"

This reverts commit 909e520c506a78b905c3bca7bf13bc414dfe3265.

reduces the number of permutations required in heuristic method

reduces the number of permutations required in heuristic method