seperate exact match and hamming distance match.