trying to use iolists, but failed a bit