changes for pagination