custom widget using composite pattern