Updating grade calculation