Updated to match r code and README.md