updated DLDistance.scala