working on dependency injection version