r_functions changes