slider refactoring