moved code around for getting queues / filtering correct