added distance calculation and display