method for sorting columnNames