second update for pagination