pretty print method