initial sensoring code, work in progress, TODO