improving emit method