added comments to R stuff