preparing for pagination