changes to compute similarity with and without in one run