adding code for slideshow buttons to work