use `unless` instead of `when not`
update