wrote the similarity definition in users class of model.py