roughly implemented decorator pattern