updated code and README.md