merge IO functions