write middle point check procedure