add condition for grade