Implemented goToSlide as a class method