updated dependency-injection