improvement on DIContainer example