Fixed Grading logic