update index and header