adding generics code