added index and scroll to click method