Gradebook refactored solution