Function for calculating OK value was implemented.