adding preparation before translating document