Slider refactorinf by Max