edited write so it properly grabs the portion of the string between the quotes