added decorator pattern and a new priciple