finish writing on recursive calculation of Green's function