Create csBFun.R