updated print_element to sort print genes in the order they apear on dna