simplify RPrim