consolidated api calls using queries