merge objects function added