compare: use matches rather than conditionals for clarity