add outputter to write method