README.md and simplify the code