using log probabilities for better performance. obtain and return multiple matches based on threshold