Add GetMidpoint method