need to change back to distance to range edge