smarter scroll handling