refactoring and add composer config