added a docstring to calculating_similarity