refactor delimited I/O functions