implemented abstract PQ sort class