Implemented the decorator design pattern