added currentIndex