compositions script + refactoring