Got distance check working (I think....)