tweaked js for scrolling