grading script and rules