updates to sensor code