more correct use of generics