modified scrollTo script