adding in code outline for structured extraction of queries