final sorts according to attendance
sorting with numbering