make a client instead of mutating the global client