add preload to index.js