modify a scroll logic