added thread Sleep, updated demos