fixed Device and added Sensor class