moving the download of data and extraction higher up the process