fix bug and refactor -> leave wiring-style instances for Sensor