Implement match and test