adjusting examples and tests to use the new API for composite instead of the legacy one