refactoring en teahcer model