Add when statement