made some small changes to the download mechanism