*Move find similar into a function
*Get rid off global variables