add formula for g_ik