added better scroll handling