new improved newClient function which might do a better job decoding json correctly :)