regenerate queries