old refactoring of fasta download code