version two with paginate almost done, need to pass tests