overloaded union function