worked on discrete calculation of grades