SANTA BARBARA, Calif. -

Unlike many rape survivors, Courtney Wettach said it's OK to use her name and photograph.

Wettach is the inspiration behind new legislation that will close a 141-year-old loophole in rape law.

Wettach was a newly divorced owner of a Solvang bookstore when she lived on Quarantina Street in 2009.  She said she wore earplugs and an eye mask to help her sleep every night.  She said she will never forget what happened at 5 a.m. on a Sunday morning.

While her boyfriend slept on her couch, a man broke into her home, through a bathroom window and got into her bed.  She woke up during the sexual assault, realized it was not her boyfriend, and started screaming.

Her boyfriend caught the man in the hallway of the home , but he managed to get away.  Police eventually caught him for other crimes.

Wettach met with Senior Deputy District Attorney Ron Zonen and said she was "astonished" when Zonen said they wold lose on appeal if they charged him with rape by impersonation.  He explained that an 1870s law was not meant for unmarried women and only considered cases involving rapists impersonating husbands.

Wettach said her rapist was sentenced to 17 years for a variety of other crimes,including peeping and molestation.

The bill to protect unmarried women passed the California State Senate on Friday and State Assembly on Monday. It is headed to Gov. Jerry Brown's desk.

The 33-year-old credits District Attorney Joyce Dudley with championing the cause that will help all unmarried women.

She is now the single mother of 7-month-old named Seth and managing a birthday party company in South Carolina.