merge elements