update index ref to js