or just catch the close event