add pretty printed function