add code to simulate r-square
Merge remote-tracking branch 'origin/master'