simplify R_mem