grade.js - Final version