cleanup the index