Adding toggle for advanced queries.