Add sorting and reversing