Added the sort API call.