doc. database, some rearrangements