Using better distance sensor code (untested)