added sleep to thread before broadcast