Add When to refactor