updating of array
corrected scrolling