completed grader.js to read both url and file