added the closed event