updated rendering to handle simple query outputs