Added a base interface and made the example more clear.