scaled the dist variable