Update functionality.php