move initialize function to index.html