add attribute init rewriting