WaitForSingleObject added