Modifying slide and next slide functionality