change output format with distance at end