fixed bugs in io
completed utils