refactored to allow input of multi-line fasta file.