function

update to r function