added close button event