add close btn functionality