adding a new method for merging data.