add proxy: call user function before serialize variable