rewrite index manager