add timeout for join()