add generic and trait
add generic and trait