added distance output