working on the correct functionality and the slider
slider is now working