small cosmetic change
keep track of type parameters in the general case