comet rewrite