refactoring + gestion atributes