use an event emitter to manage ws / pc events