emit end event