new structure and rewrite plugin