the third calculation function is done and also verified.