added various calculations for grades