rewrite index file struct