trying to implement a lightweight task queue