adding stdio copying