Added a function to create sliders, still has a bug