use prettyPrint function