moved js calls to end of index.html