buildWithPrintWriter for martel to test