V7 patricks script to compute grades