quick sort class version with xor