Added function to compute g_a^b
Added perseus backup stage