minor fix to unit 15 R code