Updated code and README.md