added switch for turning emitter off