packaging paging function into a tag