restructured query