fix #11, #12. add pretty printed output.