Add a function "sortByName"