add codes and write instruction in README.md