adding limited support for generics