Updated the grader function