added setTimeout so that buttons can click while scrolling