abstract I/O