refactoring for composer