adding 'union' functionality