make Nightcap inherit from EventEmitter