Edited logic.php