refactoring class Erro