client demo code working