added generics to adapter