use dependency injection
Merge pull request #4 from jarcoal/patch-1

use dependency injection