use generics in method signatures