add switch querying