got simple type to manage midpoint calculations
got working general data type for midpoint calc.