update dependency injection as per recommendations from @drak