Renamed query and hooked into html