refactoring to implement IoC and DI using dagger