refactory of the class, using pattern design Decorator