Added union type and unit test