update index and stuff