some preliminary lines to grade.js