initialize the slider