finishing touches on rewrite