first stab at io, seems to be working but requires some cleanup
blah