inline the Union function