refactoring of the scrollbar