update README
refactored the code and fixed some typo