Made changes to update_total_marks method