[PD-dev] improved scrolling algorithm