Changed for uniform calculation of grades