code refactoring - composer