rewrite some & fix bugs