done. fixed some bugs and implemented pretty print