unify emit and listen libs