better read code structure in io stream