sort out generics