made close button work