Finally completed Midterm