Added when and then