debugged shortDist