Making the slider work