added sleep for timeouts in demo