Made nextSlide and prevSlide functions