added debug message to calc_dist