some changes for R