refactor grader.js