removed lambda function from minimum matching function