moved Sensor to constructor, added logging