part of function of calculate similarity....