added distance between points, changed printing format