this is an improved version from what was implemented in "prettyPrinter" but I had to dig a bit into the fmt internal to achieve it.