new scroll algorithm