modernize query result structure