tested calc_grades() function in model