added slide-viewer logic to navigation buttons