should this be `events.emit(type, arg);` ?