Added a function to read multiple pages of output