adding support for pagenavi in pagination