refactoring completo, alpha 2