use `test` instead of `match`