fix decorate pattern and add basic exercise test