active-queries fn