Use wrapper class instead of monkey patching