optimized _calc_S_client