added support for generics with wildcards

Need additional testing but should work.