rewriting with vector types