fixed similarityTest indexing problem