defined readNamesAndSort()