rewrite readme & refactor some codes