rewrite some things