fix code to have error when grade below allowed score