expand the example to two levels
pull out common container code into a class decorator