update README and refactor