fixed bugs and updated README.md