refactoring to use Dagger as IoC framework