finish rewriting of new metadata and forward index -- need to test