moved index inline javascript to index.js