Added redrawSlider function