adding reloadSlider function