added generics to data structre