making the `when`/`and` test a little more readable