refactoring wrapper and decorator