determining scroll direction