algorythm was filed ito functions, implemetation of second calibration and measuring sequece