solving for g_k_C