changed watcher to event emitter