Update statfunctions.php