added queue array and modified job func