unpretty: make it re-entrent