add a boolean to stop scrolling if necessary