Updated the logic.php file