weak coupling implementation in apr.20.weak.coupling.R file