simplify the structure of rpa.f90