improving slideshow functionality