error checking
merging