finished code and updated README.md