pretty print and cleanup
pretty print