added simple unit test, and make the proxy general