Modified midterm_package