added waiting time between threads