factored out MultiQueue into its own header file