Added initial io stuff

not yet tested but it should work