small tweaks to mod3 of intro to R