updates preprocessor interface by receiving document as first parameter.