midpoint working