add paginate gem and finish order pagenation