added merge method