added ARM Ch5.1 R code