debugging + improvement of pretty printing