using Streams instead of EventEmitter