Script to compute grades