corrections following Yihui's comments