modification to checkifqueuesexist