improve io and doc