refactoring and splitting components