check conditions