implementing component hierarchy for dependency injection