added alphabetical sorting to attendance generation