use unioned generic array instead of separate types. bugfixes.