refactors dna.rb to make private invalid_sequence method