improve the IO object and the tests