Working with queries to update function call to get sectors.