add dependency injection dependency and pre-commit hook for testing