document merge example program