changed conditionals to account for quote marks

might have to change again later and escape quote marks since this
won't work for single quotes in the text