Replace action with condition