completed the initSensors function