refactoring quotation parsing