Adding functionality to change slides