order and quote refactoring