further abstraction of the io interface