Modified index.php and logic.php