ensure sorting/reversing works