fix some ownership problems
try to make rowreader dependent on trait io::Reader