midpoint method implemented; makefiles adjusted; script edited;