Example application of dependency injection