finished the slider's functionality