final html with queries