working on get_prev_slides (which is currently returning -1 instead of the last slide)