modify fuzzy match implementation