adding support for generics