finished part0 of midterm