finish the recursive calculation of Green's function