rpa for spectral function finished