enabled the scrollTo method to be a function to be called