Updated to read sensor data