switched distance thing
output distance is zero to help confirm have right exec
Cleaned up new code