Added some more additional code for Similarity computation