rewriting vector