added union function