adjust indexes