refactored generics

changed to use generics instead of raw types
explicit unsafe addObject for subrequests