completed even distribution of grades algorithm