rewrote proxy.lua