updated array_paginate