redid pretty printing using a standard library