added thread wait demo