threading using Event()