Added some code to use sliders