functions to create close matches