fixed type expansion bug
updated generics