changes to unionSerializer