distance code that we did last night

i think