merge entities