utils for download_helper