add generic and duck typing