state change code is in but distance isn't working