added option for pagination type