copy input to output