rewrite coming along, but problem when connection is sluggish