An Oklahoma trial judge quoted from the Bible's account of creation to justify his ruling that allowing someone to change their name after a sex-change operation would be fraudulent because the surgery doesn't change the person's DNA.

Now, an appeals court ruled last week that the Oklahoma County District Judge Bill Graves abused his discretion and overturned his ruling.

Religion Clause reported that Graves argued the name change could lead to inadvertent or illegal same-sex marriage, or, in case of a crime, could lead police to ignore a female suspect because they had retrieved male DNA.

“To grant a name change in this case would be to assist that which is fraudulent,” Graves wrote. “It is notable that Genesis 1:27-28 states: ‘So God created man in his own image, in the image of God created he him; male and female created he them. And God blessed them, and God said unto them, be fruitful, and multiply, and replenish the earth.' The DNA code shows God meant for them to stay male and female.”

But the Oklahoma Court of Civil Appeals sided with Steven Charles Harvey, who will now be allowed to change his name to Christie Ann Harvey, according to the Oklahoman.

“It's a vindication ... It's who I am,” Harvey, 62, said of the new name. “When you're transgendered, you are born with your mind one way and your body another. And it's something that you always know.”