index added for close button