pull i/o out of parsing fns