union and array - separate classes