implemented Model factory, Dependency Injection, Repository