refactored code to replace the "jobs" with "queries" to use the same concept in the entire app