adding Mark's suggested change
Merge pull request #398 from teamleada/tristan_refactor_grading_code

adding Mark's suggested change