Function setupClient