refactored sliding code into a function, added a 'previous exercise' button