add tests for rest of IO functions