update system queries to include average