rewrite connection read