update index, finish cover and end