update index and JS