implement prettifying output mode