copies everything to output