added merge, copy and duplicate functions