refactoring + autoreinstating essential attributes