Added distance information.
Fixing distance information functionality.