Got prettyprint function working