r-code/plots added