added cm_distance with pvalues