added I/O
removed dict that is no longer needed
small pretty change