final version midterm