code review
change logic for vertical and horizontal scrolling
typos