modify using generics.