partial refactor of scrolling logic (one step at a time)