optimizing csv downloader