handling unions and substructs now