updated scroll handling