Adds sorting functions to July 22