Added for loop to get all pages