now the conditions totally works