use compactPrint instead of prettyPrint