added auto toggle on click index