updated patch with multi-R
updated test file