allow two type parameters (this should be sufficient for 99.99% of all use cases)