implemented most of Composite