Implemented unionWithKey