implement two functions in emitter