decorator pattern implementation + tests