update the apply_funct.php