add flag to fix value of R