rewrite some sections and make them more clear