Added decorator pattern code