r_patched branch