rewrite, correct typos