add union tests
refactor