update index for scala for impatient