sort-related methods passing tests