merge download.py and merge.py and store pages in memory