class inherit from events.EventEmitter