change to unique ptr for io_, prevent aliasing