added new constructor to pnsortingcomparator and added tests