change generics to unify the type