Modified index.html with DB query for preference