Added prettyPrint function