Code for decorator pattern