new code for downloader