completed implementation of grader.js