first step of refactoring component loader