bugfix in P and added P.raw, RI.raw