make distance behave better