merging child docs into parents