add condition check