implemented pretty print