Attempting to implement sort class