refactored dna.rb