fix compile error
code to read original documents, and code to run multir (latter untested, but compiles)