adding the code for the slider