Added code sample for 'emit'