function
getgradefunction