dependency injection using monad