latest code additions for midpoint submission but NEED MORE LINES