wrote IO class