similarity algorithm to json all good