Changed pagination to batch