added end event for soc close