define emitstuff fn