added EventEmitter pubsub and isEmpty
added EventEmitter pubsub and isEmpty