call to a member function paginate() on array