use `if` instead of `case`

revert to guard clause
improve naming