Added some back-end sorting