refactored in order to support inter-component dependencies.