fix an error in sim_distance: forget sqrt