tweaks to R