inf loop in pretty print