Added grading functionality