added tag rewriting to task