Implement matching functionality