made schema merging more generic.