refacotr remove generics