add horizontal scrollbar
refactoring
hide scrollbar if it not needed