Completed the rewrite and retest