Revert "Update index.js"

This reverts commit 8d8064e819e11a56d7b98d262d9e8f3986f65326.
Revert "Update index.js"

This reverts commit 476fa246c307278e727fcc96cda45aecd190a65b.
Revert "race condition investigation"

This reverts commit b616a4e2a8fc263cb9739abcb02b564e2ff99b93.