added ability to inject instances