data merging and cleaning