removed duplicated weighting of similarity metrics into 1 function