recopy this stuff for output