rewrite basically