Updated main.php