added sorting of objects by similarity to a string