add tests
add more tests
pretty-printing bug fix