added javascript to index.hhtml