handling sensor data with socket.io