added raw code for sensors requires cleanup