s/with/when for conditionals

fix broken conditionals