rewrite plugin stuff