change local variable queue to global static one