updated sorting methods