refactor downloader delegate