modified sql, adjust index.php for AWS