Add mid-term rewrite and homework 7