refactoring + slider working