decorator class
corrected decorator pattern