update index for active class