merge method