Add generics support