modal dependency injection