add comments in header file of utility_distance, remove magic numbers in utility_distance