grade calculation repository