added Thread.join()