Added distance calculations