update sample that was designed before generics