updated main.php