documentation for the merge method