add pretty print function