Added wait between threads