formatted output, monadic map to print values, cleanup