Global function and renamed paginate