switch to local client factory function