Adding the slider logic.