matching mechanism working