output distances