add outside end event