Added better getMidPoint