tests for the proxy
more refactoring