added initSensors function