adding proxy server logic