grade calculation fix after new order