Update functions/calculateCODE.php