added logic to optionally return photos from each page as they arrive