add dependency injection 

add dependency injection
Merge pull request #1 from gabrielfs7/patch-1

Add dependency injection