added joinTask to wait for task readyness