emit in the callback