add paginate to active record