using eventemitter3 instead of node's events library