working calculation of semester grade