added task queue functionality