controlling visibility of slides