rewritten outputter