update output
add dist to zero