add event handlers and three navigation methods (goToNext, goToPrev, goToPage)