modify emit method