replace R.mathMod and R.modulo with R.mod and R.rem