added initite scroll and refactoring