made changes to y scroll so that it incorporates expanded elements