Adding end event