updated how tasks are added to queue