merge nodes