made changes to index.php and logic.php