modified prettyprinting