added sensor code - untested