Add grading function compatible with our framework