added method for getting scroll position.