added the virtual merge method for merging of objects