update index js